package com.dukk.espark.utils;

import cn.hutool.setting.Setting;

import java.io.Serializable;

/**
 * 配置信息读取类
 * @version 2020-08-24
 * @author shengshi_feiyang@yeah.net
 */
public class ConfigKit implements Serializable {
    private static final long serialVersionUID = 5202938980758501168L;

    private static Setting setting = null;

    public ConfigKit(String path){
        this.setting = new Setting(path);
        setConf();
    }

    private void setConf(){
        this.esparkFilePath = setting.getStr("espark.file.path");
        this.esparkMongodbUrl = setting.getStr("espark.mongodb.url");
        this.esparkMongodbDatabase = setting.getStr("espark.mongodb.database");

    }

    private String esparkFilePath;

    private String esparkMongodbUrl;

    private String esparkMongodbDatabase;

    public String getEsparkFilePath() {
        return esparkFilePath;
    }

    public String getEsparkMongodbUrl() {
        return esparkMongodbUrl;
    }

    public String getEsparkMongodbDatabase() {
        return esparkMongodbDatabase;
    }
}
